<div class="error">
    <?php echo validation_errors(); ?>
</div>

<?php echo form_open(base_url().'admin.php?c=header&m='.(isset($entry)?'update':'add')); ?>
    <div class="form_row">
        <label for="photo">照片</label>
        <?php echo form_dropdown('photo', $photos,isset($entry)?$entry->photo_id:'0'); ?>
</div>
<div class="form_row">
    <label for="name">姓名</label>
    <input type="text" name="name" id="name" value="<?php echo isset($entry)?$entry->name:set_value('name'); ?>"/> *
</div>
<div class="form_row">
    <label for="sex">性别</label>
    <?php echo form_dropdown('sex', $sex_array, isset($entry)?$entry:'1'); ?>
</div>
<div>个人简介</div>
<div class="form_row">
    <textarea name="content" id="content" rows="10" cols="50">
        <?php echo isset($entry)?$entry->content:set_value('content'); ?>
    </textarea>
</div>
<div class="form_btn">
    <input type="submit" name="submit" value="提交"/>
</div>
<?php echo form_close(); ?>

<?php $this->load->view('richeditor'); ?>